{% load static %}
{% load comment_tags %}
<!doctype html>
<html lang="en">
<head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <!-- TDK and ICO -->
    <title>{% block head_title %}{% endblock %}_{{ site_end_title }}</title>
    {% block metas %}
    <meta name="description" content="{{ site_description }}">
    <meta name="keywords" content="{{ site_keywords }}">
    {% endblock %}
    <link rel="shortcut icon" href="{% static 'blog/img/favicon.ico'%}" type="image/x-icon"/>
    <!-- Bootstrap and font-awesome CSS -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-beta.2/css/bootstrap.min.css"
          integrity="sha384-PsH8R72JQ3SOdhVi3uxftmaW6Vc51MKb0q5P2rRUpPvrszuE4W1povHYgTpBfshb" crossorigin="anonymous">
    <link href="https://netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
    <script src="http://cdn.bootcss.com/headroom/0.5.0/headroom.min.js"></script>
    <!-- blog CSS -->
    <link href="{% static 'blog/css/base.css' %}?v=20171223.05" rel="stylesheet">
    {% block top-file %}{% endblock %}
</head>
<body>
<!--导航开始-->
{% include 'blog/tags/navbar.html' %}
<!--导航结束-->

<!--消息块-->
{% if messages %}
<div class="container">
    {% for message in messages %}
    <div class="alert {% if message.tags %}alert-{{ message.tags }}{% else %}alert-secondary{% endif %} alert-dismissible rounded-0 fade show" role="alert">
        {{ message }}
        <button type="button" class="close" data-dismiss="alert" aria-label="Close">
            <span aria-hidden="true">&times;</span>
        </button>
    </div>
    {% endfor %}
</div>
{% endif %}

<!--回到顶部按钮-->
<div class="text-center" id="to-top">
    <i class="fa fa-chevron-up" id="btn-top" title="回到顶部"></i>
</div>

<!--主要内容块-->
<main>{% block base_content %}{% endblock %}</main>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"
        integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q"
        crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-beta.2/js/bootstrap.min.js"
        integrity="sha384-alpBpkh1PFOepccYVYDB4do5UnbKysX5WZXm3XxPqe5iKTfUKjNkCk9SaVuEZflJ"
        crossorigin="anonymous"></script>
<script>
$(function(){var myElement=document.querySelector(".blog-navbar");var headroom=new Headroom(myElement);headroom.init()});
</script>
<script src="{% static 'blog/js/base.js'%}?v=20180429.1"></script>
<script>(function(){var bp=document.createElement('script');var curProtocol=window.location.protocol.split(':')[0];if(curProtocol==='https'){bp.src='https://zz.bdstatic.com/linksubmit/push.js'}else{bp.src='http://push.zhanzhang.baidu.com/push.js'}var s=document.getElementsByTagName("script")[0];s.parentNode.insertBefore(bp,s)})();</script>
{% if user.is_authenticated %}
<script>
var msgs = {% get_notifications_count user 'false' %};
if(msgs>0){var _record=0;var myTitle=document.title;function titleBlink(){_record++;if(_record%2){document.title='【 】'+myTitle}else{document.title='【新消息】'+myTitle};setTimeout("titleBlink()",500)};titleBlink()}
</script>
{% endif %}
{% block end_file %}{% endblock %}
<footer class="container-fluid mt-4">
    <div class="card-body text-center px-0 f-16">
        <p class="card-text mb-1">Copyright&nbsp;&copy;&nbsp;2018-2019
            <a href="https://github.com/wardseptember" target="_blank" title="前往博主的Github">wardseptember</a> | <a href="http://www.miitbeian.gov.cn" target="_blank">豫ICP备19032021号-1</a>
        </p>
    </div>
</footer>
</body>
</html>